namespace Vin.Extension.Captcha.Model;

public enum CaptchaType
{
    /// <summary>
    /// 数字
    /// </summary>
    Number = 1,

    /// <summary>
    /// 字母
    /// </summary>
    Letter = 2,

    /// <summary>
    /// 数字+字母
    /// </summary>
    LetterNumber = 3
}

public class VinCaptchaOption
{
    /// <summary>
    /// 缓存Key
    /// </summary>
    public string CacheKey { get; set; } = "captcha:";

    /// <summary>
    /// 过期时间（分钟）
    /// </summary>
    public int Expire { get; set; } = 5;

    /// <summary>
    /// 固定验证码
    /// </summary>
    public string? FixedCode { get; set; }
    
    /// <summary>
    /// 验证码类型 (1:数字, 2:字母, 3:数字+字母)
    /// </summary>
    public CaptchaType CaptchaType { get; set; } = CaptchaType.LetterNumber;
}